import { createApp } from 'vue';
import FowCodeUi from 'fow-code-components';
import App from './App.vue';
import './registerServiceWorker';
import router from './router';
import store from './store';

import './permission.ts';
import './assets/css/index.scss';
import 'nprogress/nprogress.css';
import 'element-plus/lib/theme-chalk/index.css';
import 'cropperjs/dist/cropper.css';

import { components, plugins } from './plugins/elementPlus';
import globalComponent from './plugins/globalComponent';
const app = createApp(App);
app.use(FowCodeUi);
app.use(store);
app.use(router);
app.use(globalComponent);
/**
 * elementPlus
 * 挂载全局组件、插件
 */
components.forEach(component => {
	app.component(component.name, component);
});
plugins.forEach(plugin => {
	app.use(plugin);
});

app.mount('#app');
